package com.dks.mapper;

import com.dks.models.WechatUserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface WechatUserInfoMapper{

    Integer insert(WechatUserInfo wechatUserInfo);

    Integer update(WechatUserInfo wechatUserInfo);

    Integer updateByOpenId(WechatUserInfo wechatUserInfo);

    Integer delete(@Param("id") Integer id);

    WechatUserInfo select(@Param("id") Integer id);

    Integer cntByMap(Map<String, Object> map);

    List<Integer> getByMap(Map<String, Object> map);

    List<WechatUserInfo> getByMapList(Map<String, Object> map);

    Integer updateByCode(WechatUserInfo wechatUserInfo);

    WechatUserInfo selectByOpenId(@Param("openid") String openid);

    String getLoginNameByOpenid(@Param("openid") String openid);

    WechatUserInfo getByUserId(@Param("userId")long userId);

}
